In an advanced video coding (AVC) mode, a mode dependent directional transform (MDDT) that improves intra prediction encoding is proposed (for example, see Patent Documents 1 and 2). The MDDT is a technology for improving the encoding efficiency by using a Karhunen-Loeve transform (KLT) in accordance with an intra prediction mode instead of using a conventional discrete cosine transform (DCT) when an orthogonal transformation is performed for a residual error between an intra-predicted image and an input image.
The KLT is such a transform that coefficients after the transform have no correlation and is a transform in which the dispersion of a first principal component is a maximum. More bits are assigned to a large coefficient of dispersion that is acquired by such a transform, and fewer bits are assigned to a small coefficient of the dispersion, whereby the encoding efficiency can be improved.
Further, as described in Patent Document 1, the residual error between an intra-predicted image and an input image depends on an intra prediction mode. Accordingly, in the MDDT, bases of the KLT are learned in accordance with an intra prediction mode in advance, and, by using a base of the KLT that differs in accordance with each intra prediction mode, the residual can be efficiently transformed.
However, the KLT has a calculation amount more than the DCT. Thus, in Patent Document 2, it is proposed to decrease the number of times of multiplication by performing not a non-separable type KLT that has generality but a separable-type KLT having a relatively small amount of calculation for the residual between an intra-predicted image and an input-image.